<template>
	<view>
		<ff-loading :isFull="true">
			<ff-page-save ref="save" 
				@loadData="getData" 
				@submit="submit">
				<template v-slot="{data}">
					{{ data }}
					<u-input v-model="data.name" />
					<u-button type="primary" @click="$refs['save'].submit">保存</u-button>
					<u-button type="primary" @click="$refs['save'].reset">重置</u-button>
				</template>
			</ff-page-save>
		</ff-loading>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		mounted() {

		},
		methods: {
			getData(next) {
				setTimeout(() => {
					next.complete({
						name: 'wang'
					});
				}, 2000);
			},
			submit(data, next) {
				setTimeout(() => {
					next.complete();
				}, 2000);
			},
		}
	}
</script>

<style>

</style>